#include <iostream>

using namespace std;

int main(int argc, char const *argv[])
{
    int arr[10] = {1, 3, 5, 7, 9, 2, 4, 6, 8, 10};

    for (int i = 0; i < 10 / 2; i++)
    {
        /*
        int temp = arr[i];
        arr[i] = arr[10 - 1 - i];
        arr[10 - 1 - i] = arr[i];
        */
        arr[i] += arr[10 - i - 1];
        arr[10 - 1 - i] = arr[i] - arr[10 - 1 - i];
        arr[i] -= arr[10 - 1 - i];
    }
    
    for (int i = 0; i < 10; i++)
    {
        cout << arr[i] << endl;
    }
    
    return 0;
}
